The algorithm for generating an improved canonical abstract syntax tree ( CAST) directly from the grammar for a source program is given. 本文还给出了为一个源程序从文法直接生成改进的规范抽象语法树的算法。
This paper shows a parsing algorithm, which can be used to parse canonical LR ( K) grammar, but it needs only as many states as LALR ( K) does. 本文给出了一个分析算法,能分析正规的LR(K)文法,但所用的状态数目与LALR(K)相同。